<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page session="true"%>
<%

 if(session.getAttribute("user")==null){
 
   RequestDispatcher rd=request.getRequestDispatcher("/jsps/LoginForm.jsp");
  rd.forward(request,response);
   
 %>
 <%} %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  
  <head>

<script language="JavaScript" src="<%=request.getContextPath()+"/scripts/gen_validatorv31.js"%>" type="text/javascript"></script>


</head>
  
  <body >
  
 
  <jsp:include page="Header.jsp"></jsp:include>
   <br/>
 
  <center><b><h4> Mandel Update Form</h4></b></center>
   
	
		<form action="<%=request.getContextPath()+"/UpdateMandalAction"%>" method="post" name="login">
		



  <table cellspacing=2 align="center" bgcolor="#87CEEB" width="325" height="60">
		         
		            <c:if test="${not empty MandalVect}">
		           
		          
				<tr><td align='right'><b>Mandel ID :</b><br></td><td> <input type=text name="mid"  value="${MandalVect.mid }"     readonly="readonly"/>
				<br><tr><td align='right'><b>State Name :</b><br></td><td> <input type=text name="sname"  value="${MandalVect.sname }"       />
				<br><tr><td align='right'><b>District Name:</b><br></td><td> <input type=text name="dname"  value="${MandalVect.dname }"       />
				<br><tr><td align='right'><b>Mandel Name :</b><br></td><td> <input type=text name="mname"  value="${MandalVect.mname }"       />
				<br></td><td><br></td></tr>
				
				</c:if>
				<tr><td colspan=2 align='center'><input type=submit value="UPDATE" /><br></td><td>&nbsp;<br></td></tr>
			
	    </table>


<br/>
     <jsp:include page="Footer.jsp"></jsp:include>
   </form>
   
   <script language="JavaScript" type="text/javascript">
//You should create the validator only after the definition of the HTML form
  var frmvalidator  = new Validator("login");

  frmvalidator.addValidation("sname","req","State Name is required");
    frmvalidator.addValidation("sname","alpha","State Name is Only Characters");
    
    frmvalidator.addValidation("dname","req","District Name is required");
    frmvalidator.addValidation("dname","alpha","District Name is Only Characters");
    
       frmvalidator.addValidation("mname","req","Mandal Name is required");
    frmvalidator.addValidation("mname","alpha","Mandal Name is Only Characters");
    
    frmvalidator.addValidation("mid","req","MandalId  is required");
    frmvalidator.addValidation("mid","numeric");

  </script>
  </body>
</html>
